/*
 *   Copyright (C) Key Bridge Global LLC and/or its affiliates.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.keybridgeglobal.wsif.enumerated;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 * <p>Java class for enumSecurityStrategy.
 * <p/>
 * <p>The following schema fragment specifies the expected content contained
 * within this class. <p>
 * <pre>
 * &lt;simpleType name="enumSecurityStrategy">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="OAUTH_1"/>
 *     &lt;enumeration value="OAUTH_2"/>
 *     &lt;enumeration value="OPENID"/>
 *     &lt;enumeration value="SAML"/>
 *     &lt;enumeration value="SSO"/>
 *     &lt;enumeration value="X509"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * <p/>
 */
@XmlType(name = "enumSecurityStrategy")
@XmlEnum
public enum EnumSecurityStrategy {

  OAUTH_1("OAUTH_1"),
  OAUTH_2("OAUTH_2"),
  OPENID("OPENID"),
  SAML("SAML"),
  SSO("SSO"),
  @XmlEnumValue("X509")
  X_509("X509");
  private final String value;

  EnumSecurityStrategy(String v) {
    value = v;
  }

  public String value() {
    return value;
  }

  public static EnumSecurityStrategy fromValue(String v) {
    for (EnumSecurityStrategy c : EnumSecurityStrategy.values()) {
      if (c.value.equals(v)) {
        return c;
      }
    }
    throw new IllegalArgumentException(v);
  }
}
